<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加管理员</title>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <link rel="stylesheet" href="css/main.css">
    <style>
        .button{
        position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translate(-50%);
        }
        .box-card{
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-40%, -50%);
            width: 85%;
            height: 70%;
            background-color:white;
        }
    </style>
</head>
<!--只修改mian标签内容-->
<!--这里是添加管理员页面-->
<!--姓名：           -->
<body>
<div id="app">
    <el-container>
        <el-header>不动</el-header>
        <el-container>
            <el-aside width="200px">
                <el-menu @select="handleSelect" active-text-color="orange" default-active="2-2">
                    <img src="imgs/icon.png" style="margin-top: 10px" width="150px">
                    <el-divider></el-divider>
                    <el-menu-item index="1"><i class="el-icon-s-platform">数据统计分析</i></el-menu-item>
                    <el-submenu index="2">
                        <template slot="title">
                            <i class="el-icon-s-custom">管理员账号</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="2-1">管理员列表</el-menu-item>
                            <el-menu-item index="2-2">添加管理员</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="3"><i class="el-icon-user-solid"> 用户账号</i></el-menu-item>
                    <el-submenu index="4">
                        <template slot="title">
                            <i class="el-icon-video-camera"> 轮播图管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="4-1">轮播图列表</el-menu-item>
                            <el-menu-item index="4-2">添加轮播图</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="5">
                        <template slot="title">
                            <i class="el-icon-s-promotion"> 文章管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="5-1">文章列表</el-menu-item>
                            <el-menu-item index="5-2">发布文章</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="6">
                        <template slot="title">
                            <i class="el-icon-chat-line-round"> 评论管理</i>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="6-1">管理员评论</el-menu-item>
                            <el-menu-item index="6-2">用户评论</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="7"><i class="el-icon-setting"> 个人设置</i></el-menu-item>
                </el-menu>
            </el-aside>

            <!--只修改mian标签内容-->
            <el-main>
                <ei-card>
                    <h1><b>添加管理员</b></h1>
                </ei-card>
                <el-card class="box-card">
                    <el-radio-group v-model="labelPosition" size="small">
                    </el-radio-group>
                    <div style="margin: 20px;"></div>
                    <el-form :label-position="labelPosition" label-width="90px" :model="formLabelAlign">
                        <el-form-item  label="账号:" :required="true">
                            <el-input v-model="formLabelAlign.name" placeholder="请输入账号"
                                      style="width: 200px;"></el-input>
                        </el-form-item>
                        <el-form-item label="员工姓名:" :required="true">
                            <el-input v-model="formLabelAlign.region"placeholder="请输入员工姓名"
                                      style="width: 200px"></el-input>
                        </el-form-item>
                        <el-form-item label="性别:" :required="true">
                            <el-radio-group v-model="ruleForm.resource">
                                <el-radio label="男"></el-radio>
                                <el-radio label="女"></el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="手机号:" :required="true">
                            <el-input v-model="formLabelAlign.type"placeholder="请输入手机号码"
                                      style="width: 200px"></el-input>
                        </el-form-item>
                        <el-form-item label="身份证号:">
                            <el-input v-model="formLabelAlign.type"placeholder="请输入身份证号"
                                      style="width: 200px"></el-input>
                        </el-form-item>
                    </el-form>
                </el-card>
                <div class="button">
                    <el-button type="primary">保存</el-button>
                    <el-button type="primary">保存并继续添加管理员</el-button>
                    <el-button type="primary">还回</el-button>
                </div>
            </el-main>
        </el-container>
    </el-container>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: "#app",
        data: function () {
            return {
                currentIndex: "1",
                labelPosition: 'right',
                formLabelAlign: {
                    name: '',
                    region: '',
                    type: '',
                }, ruleForm: {
                    resource: '',
                }
            }
        },
        methods: {
            handleSelect(key, keyPath) {
                v.currentIndex = key;
                console.log(key);
            }
        }
    })
</script>
</html>